home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1994 July
/
1994-07b.d64
/
golf scores
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
444b
|
22 lines
10 print"[147][144]assuming 18-hole course"
20 input"first round";r1
30 ifr1<>int(r1)thengosub200:goto20
40 z=r1:gosub300
50 input"second round";r2
60 ifr2<>int(r2)thengosub200:goto50
70 z=r2:gosub300
80 input"third round";r3
90 ifr3<>int(r3)thengosub200:goto80
100 z=r3:gosub300
110 ts=r1+r2+r3:print"total shots for 3 rounds:"ts
120 n=ts/54
130 r=int(n+.5)
140 print:print"avg.shots per hole for 3 rounds:"r
150 end
200 print:print"no decimals, please!"
210 print:return
300 n=z/18
310 r=int(n+.5)
320 print:print"avg. shots per hole:"r
330 print:return